package com.ctshk.rpc.bus.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.bus.dto.BusProductCostDTO;
import com.ctshk.rpc.bus.dto.BusProductCostDateDTO;
import com.ctshk.rpc.bus.entity.BusProductCostDate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-02-19
 */
public interface BusProductCostDateMapper extends BaseMapper<BusProductCostDate> {


    /**
     * 根据产品成本id查询产品成本时间集合
     * @param busProductCostId
     * @return
     */
    @Select("<script>"+"select id,cost_id,date_begin,date_end from t_bus_product_cost_date \n" +
            "where cost_id = #{busProductCostId} \n" +
            "</script>")
    List<BusProductCostDateDTO> queryList(@Param("busProductCostId") Long busProductCostId);
}
